-- GENERATED SPELL FOR [Madrigosa] --


function spell0_24895(pUnit, Event) --@Frost Blast,n/a--
pUnit:FullCastSpellOnTarget(44872,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24895', 1000, 1)
end

function spell1_24895(pUnit, Event) --@Frost Breath,n/a--
pUnit:FullCastSpellOnTarget(45065,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24895', 5000, 1)
end

function spell2_24895(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(44843,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24895', 1000, 1)
end

function Sorts_24895(pUnit, Event)
local choix_sorts_24895 = math.random(0, 2)
if choix_sorts_24895 == 0 then
pUnit:RegisterEvent('spell0_24895', 1, 1)
end
if choix_sorts_24895 == 1 then
pUnit:RegisterEvent('spell1_24895', 1, 1)
end
if choix_sorts_24895 == 2 then
pUnit:RegisterEvent('spell2_24895', 1, 1)
end
end

function mob24895_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24895', math.random(1500, 3000), 1)
end

function mob24895_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24895_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24895_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24895, 1, 'mob24895_Action')
RegisterUnitEvent(24895, 2, 'mob24895_Leave')
RegisterUnitEvent(24895, 3, 'mob24895_Kill')
RegisterUnitEvent(24895, 4, 'mob24895_Die')
